package com.study.结构型模式.外观模式;

public class DVDPlayer {

    //使用单例模式
    private DVDPlayer(){}

    private static final class Instance{
        private static final DVDPlayer instance = new DVDPlayer();
    }

    public static DVDPlayer getInstance(){
        return Instance.instance;
    }

    public void on(){
        System.out.println("dvd on");
    }

    public void off(){
        System.out.println("dvd off");
    }

    public void play(){
        System.out.println("dvd is playing");
    }

    public void  pause(){
        System.out.println("dvd pause..");
    }
}
